# Maintainer: Caleb Maclennan <caleb@alerque.com>

pkgname=bzip3
pkgver=1.3.0
pkgrel=1
pkgdesc='A better and stronger spiritual successor to BZip2'
arch=(loong64 x86_64)
license=(LGPL3 Apache)
url="https://github.com/kspalaiologos/$pkgname"
depends=(glibc
         sh)
makedepends=(clang)
provides=("lib$pkgname.so")
_archive="$pkgname-$pkgver"
source=("$url/releases/download/$pkgver/$_archive.tar.xz")
sha256sums=('72fca01d9030e9c260e2ff8fe9d2e9f6261ea28e86adabeb6a8af3300ec390ef')

build() {
	cd "$_archive"
	./configure --prefix /usr CC=clang
	make all
}

check() {
	cd "$_archive"
	make check
}

package() {
	cd "$_archive"
	make DESTDIR="$pkgdir" install
	install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" *LICENSE
}
